﻿namespace JunFan.ViewModels
{
    using System;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Web.Mvc;

    public class ItemView
    {
        [HiddenInput]
        [ReadOnly(true)]
        public int InternalId { get; private set; }

        [Required]
        [Remote("ValidateUniqueiId", "Item", ErrorMessage = "Id already exists")]
        public string Id { get; set; }

        public string Description { get; set; }

        [DisplayName("Created on")]
        public DateTime CreatedOn { get; set; }

        [DisplayName("Completed on")]
        public DateTime? CompletedOn { get; set; }

        [DisplayName("Lead time")]
        public int LeadTime { get; set; }
    }
}